﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Data.GameData.Interfaces;

namespace Data.GameData
{
    public abstract class Order : IOrder
    {
        #region Attributes
        private string description;
        private OrderType type;

        private OrderStatusType status;
        
        private double cost;
        private int quantity;
        private int turnCreated;
        private int turnComplete;
        #endregion

        #region Constructor
        public Order()
        {
            cost = 0.0;
            quantity = 1;
            status = OrderStatusType.NOT_STARTED;
            type = OrderType.SPEND;

            turnCreated = Game.ActiveGame.TurnNumber;
            turnComplete = turnCreated;
        }
        #endregion

        #region Properties
        public string Description
        {
            get { return description; }
            set { description = value; }
        }

        public OrderType Type
        {
            get { return type; }
            protected set { type = value; }
        }

        public double Cost
        {
            get { return cost; }
            set { cost = value; }
        }

        public int Quantity
        {
            get { return quantity; }
            set { quantity = value; }
        }

        public OrderStatusType Status
        {
            get { return status; }
            protected set { status = value; }
        }

        public int TurnCreated
        {
            get { return turnCreated; }
        }

        public int TurnComplete
        {
            get { return turnComplete; }
            set { turnComplete = value; }
        }
        #endregion

        #region IOrder Members
        public abstract void Fulfill();
        #endregion
    }
}
